home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d3 / histry50.arc / HISTORY.DOC next >
Text File  |  1988-04-05  |  14KB  |  327 lines

  1.         HISTORY                                            PC Version 5.0
  2.  
  3.  
  4.                                    Description
  5.  
  6.              HISTORY is a program for PC-DOS 2.0 and later (there is also
  7.         a version for the DEC Rainbow) which allows the user to recall,
  8.         edit, and reissue previously-typed DOS commands.  If a mistake is
  9.         made on the command currently being entered but is not noticed
  10.         until after several more characters have been typed, the mistake
  11.         may be fixed without deleting the intervening characters.
  12.  
  13.              Commands are saved in a 512-byte FIFO buffer.  The number of
  14.         commands that can be saved in the buffer depends on their length.
  15.         When the buffer becomes full, one or more of the oldest commands
  16.         are evicted to make room for a new command.  If a new command is
  17.         identical to the immediately preceding command, it is not
  18.         duplicated in the history buffer.
  19.              
  20.              The user steps back and forth through old commands using the
  21.         up- and down-arrow keys.  Up-arrow recalls the most recent
  22.         command, another up-arrow the second most recent, and so forth.
  23.         Down-arrow moves forward in the buffer.  Both movements are
  24.         circular -- when up-arrow reaches the oldest command another up-
  25.         arrow will return to the current command (the DOS prompt).  An
  26.         initial down-arrow will move to the oldest command.
  27.  
  28.               The left- and right-arrow keys may be used to move within a
  29.         line.  Home moves to the beginning of the line, while End moves
  30.         back to the end.  The Backspace key deletes the character to the
  31.         left of the cursor and the Del key deletes the character under
  32.         the cursor.  Normal characters are inserted into the line.  Other
  33.         editing commands are summarized below.
  34.  
  35.              A line may be recalled by content by typing Alt-S; the user
  36.         is then prompted for an anchored search string.  The history list
  37.         is searched backwards for the line beginning with the specified
  38.         string.  To search for the next-most recent occurrence of the
  39.         string, the user merely hits Alt-F.  As a shorthand for Alt-S,
  40.         Alt-X prompts for a single-character search string without a
  41.         carriage return; the selected string is automatically sent.  The
  42.         string seleted by Alt-S or Alt-X is remembered between HISTORY
  43.         invocations.  Subsequent uses of Alt-F use this string until
  44.         another is chosen.  All searches wrap circularly.
  45.  
  46.              Multiple DOS commands may be entered on one line by
  47.         separating them with a semi-colon.  The commands will be sent one
  48.         at a time to DOS.  A semicolon as the last character on the line
  49.         will be sent along (hello, MicroSoft).  To enter a semicolon mid-
  50.         command, type two (one will be sent).
  51.  
  52.              Other function key actions are described under "Function Key
  53.         Summary" below.
  54.  
  55.  
  56.                                 Immortal Commands
  57.  
  58.              Up to 256 bytes of "immortal" commands make be loaded from
  59.         a file by specifying the file name as an argument when HISTORY is
  60.         loaded or by loading the file interactively with Alt-L.  The
  61.         commands are immortal in that they are not deleted to make room
  62.         for new commands.  The immortal commands remain at the top
  63.         (oldest) part of the buffer and thus are immediately accessible
  64.         via the down-arrow key.  They may be searched for and otherwise
  65.         treated as any other commands.
  66.  
  67.              The buffer is cleared before the file is loaded.
  68.  
  69.  
  70.                                      Aliases
  71.  
  72.              Commands may be given an alias via the syntax
  73.  
  74.                 :alias replacement
  75.  
  76.              Whenever the alias is typed at the start of the line, its
  77.         replacement is inserted in its place and the result sent to DOS.
  78.         For example given the aliases
  79.  
  80.                 :dw dir /w
  81.                 :t type
  82.  
  83.         in the command buffer, typing
  84.  
  85.                 dw
  86.  
  87.         is equivalent to typing
  88.         
  89.                 dir /w
  90.  
  91.         and       
  92.  
  93.                 t fred
  94.  
  95.         is equivalent to
  96.  
  97.                 type fred
  98.  
  99.              Alias substitution is only done on the first word of a
  100.         command; multiple commands separated by semicolons will, however,
  101.         have alias substitution applied to each command.  Substitution is
  102.         tried only once per command, thus
  103.  
  104.                 :dir dir /w
  105.  
  106.         will not loop recursively but will give the desired result.
  107.  
  108.              Aliases are usually loaded from a file of immortal commands
  109.         but may also be established interactively.  Non-immortal aliases
  110.         eventually age and die, however.
  111.  
  112.              If multiple definitions of the same alias exist, the first
  113.         one encountered searching from most recent to oldest is used.  If
  114.         an alias is defined with no replacement string, e.g.
  115.  
  116.                 :dir
  117.  
  118.         then this cancels the effect of older definitions of the same
  119.         alias; in this case dir is no longer an alias for something else.
  120.  
  121.  
  122.                                     Hot Keys
  123.  
  124.              A special case of an alias is the Hot Key.  A command may be
  125.         aliased as a function key.  If the function key is then pressed
  126.         at the beginning of the line, the command is executed without
  127.         waiting for a carriage return.  The alias must be a 2-character
  128.         hex code from the following table:
  129.  
  130.         Key    Code     Key    Code     Key    Code     Key         Code
  131.  
  132.         F1      3B      Alt-F1  68      Alt-A   1E      Alt-Hyphen   82
  133.         F2      3C      Alt-F2  69      Alt-B   30      Back-Tab     0F
  134.         F3      3D      Alt-F3  6A      Alt-C   2E
  135.         F4      3E      Alt-F4  6B      Alt-E   12
  136.         F5      3F      Alt-F5  6C      Alt-G   22
  137.         F6      40      Alt-F6  6D      Alt-I   17
  138.         F7      41      Alt-F7  6E      Alt-J   24
  139.         F8      42      Alt-F8  6F      Alt-K   25
  140.         F9      43      Alt-F9  70      Alt-M   32
  141.         F10     44      Alt-F10 71      Alt-N   31
  142.         Sh-F1   54      Alt-1   78      Alt-P   19
  143.         Sh-F2   55      Alt-2   79      Alt-Q   10
  144.         Sh-F3   56      Alt-3   7A      Alt-R   13
  145.         Sh-F4   57      Alt-4   7B      Alt-T   14
  146.         Sh-F5   58      Alt-5   7C      Alt-U   16
  147.         Sh-F6   59      Alt-6   7D      Alt-V   2F
  148.         Sh-F7   5A      Alt-7   7E      Alt-W   11
  149.         Sh-F8   5B      Alt-8   7F      Alt-Y   15
  150.         Sh-F9   5C      Alt-9   80      Alt-Z   2C
  151.         Sh-F10  5D      Alt-0   81      Alt-=   83
  152.  
  153.         These codes are cryptic, but a more user-friendly scheme would
  154.         consume precious dedicated memory.  You may put a comment at the
  155.         end of the alias definition by preceding the comment by zero or
  156.         more spaces followed by two pound signs (##).
  157.  
  158.              As an example, the following alias in the command buffer
  159.  
  160.                 :44 dir  ## F10
  161.  
  162.         would cause the dir command to be executed when F10 was pressed.
  163.  
  164.  
  165.                                   Installation
  166.  
  167.              HISTORY is enabled by executing HISTORY.EXE once per boot,
  168.         typically from AUTOEXEC.BAT.  It requires about 8K of dedicated
  169.         memory.
  170.  
  171.              If an argument is present it is assumed to be the name of a
  172.         file containing immortal commands to read into the buffer.  Only
  173.         the first 256 bytes will be read; it may, of course, be shorter
  174.         than that.
  175.  
  176.              HISTORY works by trapping DOS function 0AH.  Since programs
  177.         other than COMMAND.COM also use function 0AH, HISTORY must
  178.         distinguish COMMAND.COM from the crowd.  It does this by
  179.         remembering the address of the very first program to call it
  180.         after it's been loaded; to insure that COMMAND.COM is the first
  181.         caller, make HISTORY the last command in AUTOEXEC.BAT or invoke
  182.         it manually.
  183.  
  184.  
  185.                               Function Key Summary
  186.  
  187.              Up-arrow or    Move back through commands.
  188.              PgUp
  189.              Down-arrow or  Move forward through commands.
  190.              PgDn
  191.              Left-arrow     Move the cursor left one character.
  192.              Right-arrow    Move the cursor right one character.
  193.              Home           Move the cursor to the beginning of line.
  194.              End            Move the cursor to the end of the line.
  195.              Cntrl-left     Move the cursor left one word.
  196.              Cntrl-right    Move the cursor right one word.
  197.              Backspace      Delete the character before the cursor.
  198.              Del            Delete the character under the cursor.
  199.              ^PgUp          Delete from start of previous word to cursor.
  200.              ^PgDn          Delete from cursor to start of next word.
  201.  
  202.              Ctrl-Home      Delete from the beginning of the line to the
  203.                             cursor.
  204.              Ctrl-End       Delete from the cursor to the end of the
  205.                             line.
  206.              Ins            Toggle insert/overstrike mode (starts each
  207.                             time in insert mode).
  208.              Return         Send the line.
  209.  
  210.              Alt-S          Select and find search string.
  211.              Shift-Alt-S    Select and find search string and execute.
  212.              Alt-F          Find next occurrence of string (remembered
  213.                             between commands).
  214.              Shift-Alt-F    Find search string and execute.
  215.              Alt-X          Select and find one-character search string
  216.                             and execute.
  217.              Alt-D          Same as typing "EXIT"; useful for leaving
  218.                             secondary COMMAND.COM's.
  219.              Alt-H          Lists the contents of the history buffer,
  220.                             oldest to most recent.
  221.              Shift-Alt-H    Lists the contents of the history buffer,
  222.                             most recent to oldest.
  223.              Alt-O          Turns HISTORY off; commands are parsed via
  224.                             normal DOS code until Control-Z followed by
  225.                             Return is typed.  HISTORY remains resident
  226.                             in memory and the command buffer remains
  227.                             intact.
  228.              Alt-L          Promts for the name of a file of immortal
  229.                             commands and loads that file.
  230.  
  231.              ;              If not the last character on the line, splits
  232.                             DOS commands.  They are handed one at a time
  233.                             to COMMAND.COM.  If last on the line, it is
  234.                             sent along as part of the command.  To send a
  235.                             semicolon mid-command, type two semicolons.
  236.              ^C or ^X       Delete the line being typed/edited.
  237.  
  238.  
  239.                              Printer Considerations
  240.  
  241.              When printing a file using the standard DOS print spooler 
  242.         PRINT.COM, lines are sent to the printer only when awaiting DOS
  243.         input; since HISTORY bypasses DOS input when awaiting command
  244.         input, the printer will stop until a command is run.
  245.  
  246.              Similarly, Control-P (printer toggle) will not be recognized
  247.         in HISTORY.  The solution to both problems is to use Alt-O to turn
  248.         HISTORY off long enough for the file to print or to type
  249.         Control-P (once toggled on you may turn HISTORY back on; printing
  250.         will take place in this case).
  251.  
  252.              To turn HISTORY back on, type Control-Z followed by Return.
  253.              
  254.  
  255.                                Modification History
  256.  
  257.                                    Version 2.6
  258.  
  259.              A bug which caused the system to hang was fixed.
  260.              
  261.              HISTORY properly handles long lines which wrap around two
  262.         rows.
  263.         
  264.              Searches are now caseless.
  265.  
  266.              The amount of dedicated memory required has been reduced.
  267.  
  268.                                    Version 2.7
  269.  
  270.              A bug associated with ^X was fixed.
  271.  
  272.                                    Version 3.0
  273.  
  274.              Immortal commands added.  Labeled commands added.
  275.  
  276.              If a command is identical to the immediately preceding
  277.         command, the second is not saved in the history buffer.
  278.  
  279.                                    Version 3.1
  280.  
  281.              Fixed a bug which caused immortal commands to be mortal.
  282.  
  283.                                    Version 3.2
  284.  
  285.              Fixed a bug which ocurred when backspacing over the response
  286.         to a prompt.
  287.  
  288.                                    Version 3.3
  289.  
  290.              Added delete-word commands.
  291.  
  292.                                    Version 3.4
  293.  
  294.              Made ^C behave like ^X.
  295.  
  296.                                    Version 3.5
  297.  
  298.              Replaced F10, F9, etc., with Alt keys.  Added Shift-Alt-S
  299.         and Shift-Alt-S.
  300.  
  301.                                    Version 4.0
  302.  
  303.              Labeled commands replaced with aliasing.
  304.  
  305.                                    Version 4.1
  306.  
  307.              Alias substitution applied to semicolon-separated commands.
  308.  
  309.                                    Version 5.0
  310.  
  311.              Added Hot Keys.  Added Shift-Alt-H (lists command buffer in
  312.         reverse order).  Added alias cancel capability.  ^C cancels
  313.         command buffer list.
  314.  
  315.  
  316.                                   Author, author
  317.  
  318.         Copyright (c) 1985,86,87 by Bryan Higgins.  All rights reserved,
  319.         except the right to copy for non-commercial use.
  320.  
  321.         The author may be reached/rewarded at
  322.  
  323.                 1802 Channing Way
  324.                 Berkeley, CA 94703
  325.  
  326.         One of the Kramden Utilities.
  327.